package com.project.controller;

import com.project.bean.PermissionBean;
import com.project.mapper.IPermissionMapper;
import com.project.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("permission")
public class PermissionController {
    @Autowired
    private IPermissionService service;

    @RequestMapping("findAll")
    public List<PermissionBean> findAll() {
        return service.findAll();
    }
    @RequestMapping("findByRoleIdArray")
    public List<PermissionBean> findByRoleIdArray(Integer[] roleIdArray) {
        return service.findByRoleIdArray(roleIdArray);
    }
}
